import { reactive,computed,toRefs } from "vue";
export default function(){
    const state = reactive({
        count:0,
        double:computed(()=>state.count * 2)
    })
    function increment(){
        state.count++
    }
    const {count,double} = toRefs(state)
    return {
        count,
        double,
        increment
    }
}